package com.sen.patterns.creational.factory.ex3;

/**
 * 电脑生产者
 * @author sen
 */
public abstract class ComputerProducer {
	
	public static ComputerProducer getProducer(String str) {
		if ("mac".equalsIgnoreCase(str)) {
			return new MacProducer();
		} else if ("pc".equalsIgnoreCase(str)) {
			return new PcProducer();
		}
		
		return null;
	}
}
